/**
 * 后端返回的字段信息列表
 * @type {[{param: string, label: string, type: string, key: string, order: number},{param: string, label: string, type: string, key: string, order: number},{param: string, label: string, type: string, key: string, order: number},{param: string, label: string, type: string, key: string, order: number},{param: string, label: string, type: string, key: string, order: number}]}
 *
 * <p>字段解释:</p>
 * <p>label: 显示的标题文字</p>
 * <p>key:   字段的key,用于回传</p>
 * <p>type:  字段类型: text-> el-input; number -> el-inputNumber; date-> el-date-picker 以此类推</p>
 * <p>required: 是否必填</p>
 * <p>param: 一些下拉框,多选框默认的参数,在select和check-box中有用</p>
 * <p>order:  字段排序,数字小的在前面</p>
 */
export const fieldData = [
    {
        label: "姓名",
        key: "name",
        type: "text",
        required: false,
        order: 1
    },
    {
        label: "年龄",
        key: "age",
        type: "number",
        required: false,
        order: 2
    },
    {
        label: "出生年月",
        key: "birthday",
        type: "date",
        required: false,
        order: 4
    },
    {
        label: "籍贯",
        key: "birthPlace",
        type: "select",
        required: false,
        optionItems: [
            {
                "label": "广西",
                "value": "gx"
            },
            {
                "label": "江苏",
                "value": "js"
            },
            {
                "label": "安徽",
                "value": "ah"
            }
        ],
        order: 3
    },
    {
        label: "爱吃的菜",
        key: "favoriteDishes",
        type: "checkbox",
        required: false,
        optionItems: [
            {
                "label": "牛肉干",
                "value": 1
            },
            {
                "label": "三文鱼",
                "value": 2
            },
            {
                "label": "黄焖鸡",
                "value": 3
            },
            {
                "value": 4,
                "label": "哈啤"
            },
            {
                "value": 5,
                "label": "茅台"
            }
        ],
        order: 5
    },
]
